package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/23 06:32
 * 邮箱：2235445233@qq.com
 */
public class ProblemDetail {


    /**
     * code : 200
     * msg : success
     * data : {"id":"26","subject_id":"2","uid":"8","title":"问题1111","content":"很难啊222","images":["http://yigoo.gxhao.cc/Uploads/quiz/2017-05-01/5906e5219242d.png"],"status":"1","student_school":"","student_class":"","student_name":"","answer_content":"6363。你在哪？抓？","answer_images":["http://yigoo.gxhao.cc/Uploads/quiz/2017-05-02/5907fc810c460.JPEG"],"answered_by":"14","pay":"1","created_at":"1493624097","answer_at":"1493695617","subject_name":"物理","school":"shandongligongdaxue","section":"ruanjianxueyuan","grade":"sinianji","nick_name":null,"create_date":"2017-05-01","answer_date":"2017-05-02","teacher":{"teacher_id":"14","teacher_pic":"/Uploads/2017-04-14/58f0a479710ec.jpg","name":"陈武","area":"广西市朝阳区和商路10号","school_name":"北京财经学院","section":"数学系","grade":"二年级","questions":"4","rank":"3"}}
     */

    private String code;
    private String msg;
    private DataBean data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public ProblemDetail(String json) {
        ProblemDetail result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * id : 26
         * subject_id : 2
         * uid : 8
         * title : 问题1111
         * content : 很难啊222
         * images : ["http://yigoo.gxhao.cc/Uploads/quiz/2017-05-01/5906e5219242d.png"]
         * status : 1
         * student_school :
         * student_class :
         * student_name :
         * answer_content : 6363。你在哪？抓？
         * answer_images : ["http://yigoo.gxhao.cc/Uploads/quiz/2017-05-02/5907fc810c460.JPEG"]
         * answered_by : 14
         * pay : 1
         * created_at : 1493624097
         * answer_at : 1493695617
         * subject_name : 物理
         * school : shandongligongdaxue
         * section : ruanjianxueyuan
         * grade : sinianji
         * nick_name : null
         * create_date : 2017-05-01
         * answer_date : 2017-05-02
         * teacher : {"teacher_id":"14","teacher_pic":"/Uploads/2017-04-14/58f0a479710ec.jpg","name":"陈武","area":"广西市朝阳区和商路10号","school_name":"北京财经学院","section":"数学系","grade":"二年级","questions":"4","rank":"3"}
         */

        private String id;
        private String subject_id;
        private String uid;
        private String title;
        private String content;
        private String status;
        private String student_school;
        private String student_class;
        private String student_name;
        private String answer_content;
        private String answered_by;
        private String pay;
        private String created_at;
        private String answer_at;
        private String subject_name;
        private String school;
        private String section;
        private String grade;
        private Object nick_name;
        private String create_date;
        private String answer_date;
        private TeacherBean teacher;
        private List<String> images;
        private List<String> answer_images;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getSubject_id() {
            return subject_id;
        }

        public void setSubject_id(String subject_id) {
            this.subject_id = subject_id;
        }

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getStudent_school() {
            return student_school;
        }

        public void setStudent_school(String student_school) {
            this.student_school = student_school;
        }

        public String getStudent_class() {
            return student_class;
        }

        public void setStudent_class(String student_class) {
            this.student_class = student_class;
        }

        public String getStudent_name() {
            return student_name;
        }

        public void setStudent_name(String student_name) {
            this.student_name = student_name;
        }

        public String getAnswer_content() {
            return answer_content;
        }

        public void setAnswer_content(String answer_content) {
            this.answer_content = answer_content;
        }

        public String getAnswered_by() {
            return answered_by;
        }

        public void setAnswered_by(String answered_by) {
            this.answered_by = answered_by;
        }

        public String getPay() {
            return pay;
        }

        public void setPay(String pay) {
            this.pay = pay;
        }

        public String getCreated_at() {
            return created_at;
        }

        public void setCreated_at(String created_at) {
            this.created_at = created_at;
        }

        public String getAnswer_at() {
            return answer_at;
        }

        public void setAnswer_at(String answer_at) {
            this.answer_at = answer_at;
        }

        public String getSubject_name() {
            return subject_name;
        }

        public void setSubject_name(String subject_name) {
            this.subject_name = subject_name;
        }

        public String getSchool() {
            return school;
        }

        public void setSchool(String school) {
            this.school = school;
        }

        public String getSection() {
            return section;
        }

        public void setSection(String section) {
            this.section = section;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public Object getNick_name() {
            return nick_name;
        }

        public void setNick_name(Object nick_name) {
            this.nick_name = nick_name;
        }

        public String getCreate_date() {
            return create_date;
        }

        public void setCreate_date(String create_date) {
            this.create_date = create_date;
        }

        public String getAnswer_date() {
            return answer_date;
        }

        public void setAnswer_date(String answer_date) {
            this.answer_date = answer_date;
        }

        public TeacherBean getTeacher() {
            return teacher;
        }

        public void setTeacher(TeacherBean teacher) {
            this.teacher = teacher;
        }

        public List<String> getImages() {
            return images;
        }

        public void setImages(List<String> images) {
            this.images = images;
        }

        public List<String> getAnswer_images() {
            return answer_images;
        }

        public void setAnswer_images(List<String> answer_images) {
            this.answer_images = answer_images;
        }

        public static class TeacherBean {
            /**
             * teacher_id : 14
             * teacher_pic : /Uploads/2017-04-14/58f0a479710ec.jpg
             * name : 陈武
             * area : 广西市朝阳区和商路10号
             * school_name : 北京财经学院
             * section : 数学系
             * grade : 二年级
             * questions : 4
             * rank : 3
             */

            private String teacher_id;
            private String teacher_pic;
            private String name;
            private String area;
            private String school_name;
            private String section;
            private String grade;
            private String questions;
            private String rank;

            public String getTeacher_id() {
                return teacher_id;
            }

            public void setTeacher_id(String teacher_id) {
                this.teacher_id = teacher_id;
            }

            public String getTeacher_pic() {
                return teacher_pic;
            }

            public void setTeacher_pic(String teacher_pic) {
                this.teacher_pic = teacher_pic;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getArea() {
                return area;
            }

            public void setArea(String area) {
                this.area = area;
            }

            public String getSchool_name() {
                return school_name;
            }

            public void setSchool_name(String school_name) {
                this.school_name = school_name;
            }

            public String getSection() {
                return section;
            }

            public void setSection(String section) {
                this.section = section;
            }

            public String getGrade() {
                return grade;
            }

            public void setGrade(String grade) {
                this.grade = grade;
            }

            public String getQuestions() {
                return questions;
            }

            public void setQuestions(String questions) {
                this.questions = questions;
            }

            public String getRank() {
                return rank;
            }

            public void setRank(String rank) {
                this.rank = rank;
            }
        }
    }
}
